The first game was far ahead of its competition, but overlooked. The second ironed out most if the flaws and was a groundbreaking success. The sequel was inevitable - but now, with time and money on their hands, the developers could focus on making it not only quite good, but near-perfect; they had the ideal foundations for this task.
And boy, they succeeded.
Apart from one glaring issue and a few details your mileage might vary on, Mega Man 3 is about as good a game as they get - for its time, for the NES, and forever.